package com.oracle.sbdb.testbo;

import java.util.List;

import net.sf.json.JSONObject;

import org.junit.Test;

import com.oracle.sbdb.bo.BugInfoBo;
import com.oracle.sbdb.servlet.model.BugInformation;

public class BugInfoBoTest {

//	@Test
	public void testSelectbyEmployeeId() {
		BugInfoBo bo = BugInfoBo.INSTANCE;
		long time1 = System.currentTimeMillis();
		bo.selectbyEmployeeID(25160);
		long time2 = System.currentTimeMillis();
		bo.selectbyID(25160);
		long time3 = System.currentTimeMillis();
		System.out.println(time2 - time1);
		System.out.println(time3 -time2);
	}
	
//	@Test
	public void testSelectbyBugId() {
		BugInfoBo bo = BugInfoBo.INSTANCE;
		BugInformation bugInfo = bo.selectbyID(1);
		JSONObject responseObject = JSONObject.fromObject(bugInfo);
		System.out.println(responseObject.toString());
	}
	@Test
	public void testSelectbyKeyPhrase() {
		List list = BugInfoBo.INSTANCE.selectbyKeyPhrase("Oracle");
		System.out.println(list.size());
	}

}
